<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3_单选框控制显示隐藏</title>
    <script src="./lib/angularjs.js"></script>
</head>

<body ng-app="myApp" ng-controller="myCtrl">
    <!-- 当ng-model和ng-value共存时，前者的值是从后者那里拿来并存到$scope对应的变量中的。如果前者有初始值，则也会同步给后者。 -->
    <label for="open"><input type="radio" id="open" ng-model="status" ng-value="1">开启</label>
    <label for="cancel"><input type="radio" id="cancel" ng-model="status" ng-value="0">关闭</label>
    <div>status：{{status}}</div>
    <div ng-show="status === 0">
        <h3>温馨提示</h3>
        <p>该网站正在维护中。。。请等待</p>
    </div>
</body>

<script>
    const myApp = angular.module("myApp", [])
    myApp.controller("myCtrl", ["$scope", function ($scope) {
        $scope.status = 1
    }])
</script>

</html>